<script src="../../../wen/src/router/index.js"></script>
<template>
  <div>
    <el-container>
      <el-header>
        <div class="header">
          <div><span class="logo">LOGO</span><span class="name">教育部温测信息平台</span></div>
          <ul>
            <li>组织：{{agent}}</li>
            <li>组织负责人：{{agenter}}</li>
            <li>用户名：{{user}}</li>
            <li>职位：{{position}}</li>
          </ul>
        </div>
      </el-header>
      <el-container>
        <el-aside width="200px" class='sidebar'>
          <el-aside width="200px" style="background-color: rgb(238, 241, 246);">
            <el-menu :default-openeds="['1','2','3','4','5','6']" :router='true'>
              <el-submenu index="1">
                <template slot="title"><i class="icons icon1"></i>监控动态</template>
                <el-menu-item-group>
                  <el-menu-item index="/index"><i class="marks"></i>全局监控</el-menu-item>
                  <el-menu-item index="/monitoring"><i class="marks"></i>人员监控</el-menu-item>
                </el-menu-item-group>
              </el-submenu>
              <el-submenu index="2">
                <template slot="title"><i class="icons icon2"></i>核酸检测</template>
                <el-menu-item-group>
                  <el-menu-item index="/test"><i class="marks"></i>核酸检测</el-menu-item>
                </el-menu-item-group>
              </el-submenu>
              <el-submenu index="3">
                <template slot="title"><i class="icons icon3"></i>疫情资讯</template>
                <el-menu-item-group>
                  <el-menu-item index="outbreaknotice"><i class="marks"></i>疫情公告</el-menu-item>
                  <el-menu-item index="antiepidemic"><i class="marks"></i>防疫地图</el-menu-item>
                </el-menu-item-group>
              </el-submenu>
              <el-submenu index="4">
                <template slot="title"><i class="icons icon4"></i>应急处理</template>
                <el-menu-item-group>
                  <el-menu-item index="/emergency/map/province"><i class="marks"></i>医院地图</el-menu-item>
                  <el-menu-item index="medicalAuthorities"><i class="marks"></i>医疗机关</el-menu-item>
                  <el-menu-item index="disinfection"><i class="marks"></i>场所消杀</el-menu-item>
                </el-menu-item-group>
              </el-submenu>
              <el-submenu index="5">
                <template slot="title"><i class="icons icon5"></i>组织管理</template>
                <el-menu-item-group>
                  <el-menu-item index="/preview"><i class="marks"></i>组织预览</el-menu-item>
                  <el-menu-item index="/organizationAdministration"><i class="marks"></i>组织管理</el-menu-item>
                  <el-menu-item index="/organization"><i class="marks"></i>组织创建</el-menu-item>
                  <el-menu-item index="/personnelAdministration"><i class="marks"></i>人员管理</el-menu-item>
                  <el-menu-item index="/creatSchool"><i class="marks"></i>人员创建</el-menu-item>
                  <!-- <el-submenu index="5">
                    <template slot="title"><i class="icons icon5"></i>人员创建</template>
                    <el-menu-item-group>
                      <el-menu-item index="creatStudent"><i class="marks"></i>人员创建-学生</el-menu-item>
                      <el-menu-item index="creatSchool"><i class="marks"></i>人员创建-学校</el-menu-item>
                    </el-menu-item-group>
                  </el-submenu> -->
                </el-menu-item-group>
              </el-submenu>
              <el-submenu index="6">
                <template slot="title"><i class="icons icon6"></i>功能配置</template>
                <el-menu-item-group>
                  <el-menu-item index="/config/monitor"><i class="marks"></i>监控配置</el-menu-item>
                </el-menu-item-group>
                <el-menu-item-group>
                  <el-menu-item index="/config/personal"><i class="marks"></i>个人预案配置</el-menu-item>
                </el-menu-item-group>
                <el-menu-item-group>
                  <el-menu-item index="/config/organization"><i class="marks"></i>组织预案配置</el-menu-item>
                </el-menu-item-group>
                <el-menu-item-group>
                  <el-menu-item index="/config/orgManage"><i class="marks"></i>医疗组织管理</el-menu-item>
                </el-menu-item-group>
                <el-menu-item-group>
                  <el-menu-item index="/config/announcement"><i class="marks"></i>公告配置</el-menu-item>
                </el-menu-item-group>
                <el-menu-item-group>
                  <el-menu-item index="/config/place"><i class="marks"></i>场所管理</el-menu-item>
                </el-menu-item-group>
              </el-submenu>
            </el-menu>
          </el-aside>
        </el-aside>
        <el-main class='context'>
          <transition name="router" mode="out-in">
            <router-view/>
          </transition>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
  import sidebar from './sidebar'
  import PageHeader from './header'
  export default {
    data() {
      return {
        agent: '广东教育局',
        agenter: '王小王',
        user: '王林',
        position: '科员'
      }
    },
    method: {

    },
    components: {
      sidebar,
      PageHeader,
    },
    name: 'App'
  }
</script>

<style scoped lang="less">
  .icons{
    display: inline-block;
    width: 18px;
    height: 16px;
    margin-right: 8px;
  }
  .icon1{
     background: url("../assets/images/s1.png") no-repeat center;
     background-size: 15px;
  }
  .icon2{
    background: url("../assets/images/s2.png") no-repeat center;
    background-size: 15px;
  }
  .icon3{
    background: url("../assets/images/s3.png") no-repeat center;
    background-size: 15px;
  }
  .icon4{
    background: url("../assets/images/s4.png") no-repeat center;
    background-size: 15px;
  }
  .icon5{
    background: url("../assets/images/s5.png") no-repeat center;
    background-size: 15px;
  }
  .icon6{
    background: url("../assets/images/s6.png") no-repeat center;
    background-size: 15px;
  }
  /deep/ .el-menu-item-group__title {
    padding: 0 !important;
  }

  /deep/ .el-header {
    padding: 0;
    height: 80px !important;
  }

  .header {
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    background-color: #000;
    height: 100%;

    div {
      display: inline-flex;
      color: white;
      line-height: 80px;

      .logo {
        font-size: 25px;
      }

      .name {
        font-size: 18px;
        font-weight: bold;
        margin-left: 15px;
      }
    }

    ul {
      width: 280px;
      overflow: hidden;
      padding-top: 14px;

      li {
        float: left;
        width: 140px;
        font-size: 13px;
        color: white;
        text-align: left;
        line-height: 26px;
      }
    }
  }

  .sidebar {
    height: calc(100vh - 80px);
    background: #000;

    .marks {
      display: inline-block;
      width: 3px;
      height: 13px;
      background-color: #000;
      margin-right: 6px;
    }

    /deep/ .el-submenu__title {
      color: white;
    }

    /deep/ .el-menu-item {
      color: white;
    }

    /deep/ .el-menu {
      border-right: none;
      background-color: #000 !important;
    }

    /deep/ .el-submenu .el-menu-item {
      padding: 0;
      padding-left: 60px !important;
    }

    /deep/ .el-menu-item:focus,
    .el-menu-item:hover {
      background-color: #000;
    }

    /deep/ .el-menu-item:focus .marks,
    .el-menu-item:hover .marks {
      background-color: blue;
    }

    /deep/ .el-submenu__title:hover {
      background-color: #013064;
    }

    /deep/ .el-submenu__title i {
      color: white;
    }

    .el-submenu {
      text-align: left;
    }

    &::-webkit-scrollbar {
      display: none;
      width: 0;
      /*对垂直流动条有效*/
      height: 0;
      /*对水平流动条有效*/
    }

    &::-webkit-scrollbar-track {
      -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
      background-color: rosybrown;
      border-radius: 3px;
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 7px;
      -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
      background-color: #E8E8E8;
    }
  }

  .context {
    background-color: #0b1026;
    padding: 30px 40px !important;
    height: calc(100vh - 80px);

    /*修改滚动条样式*/
    &::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }

    &::-webkit-scrollbar-track {
      background: rgb(239, 239, 239);
      /*border-radius:2px;*/
    }

    &::-webkit-scrollbar-thumb {
      background: #d25d57;
      /*border-radius:10px;*/
    }

    /*::-webkit-scrollbar-thumb:hover{*/
    /*    background: #333;*/
    /*}*/
    &::-webkit-scrollbar-corner {
      background: #179a16;
    }
  }
</style>
